﻿#region Copyright and Licensing Notice
// Copyright (C) 2011 Steven Bosnick
// 
// This program is open source software; you can redistribute it 
// and/or modifiy it under the terms of the Eclipse Public License,
// version 1.0.
// 
// This program is distributed in the hope that it will be useful, 
// but WITHOUT ANY WARRANTY; without even the implied
// warranty of MERCHANTABILITY or FITNESS FOR A 
// PARTICULAR PURPOSE. See the Eclipse Public License for more
// details.
// 
// You should have received a copy of the Eclipse Public License 
// along with this program; if not, you can find a copy at
// "http://www.opensource.org/licenses/eclipse-1.0.php".
#endregion
using System;
using BitwiseOre.SharedMemory.JetBrains;

namespace BitwiseOre.SharedMemory.Context
{
    /// <summary>
    /// Describes the context within which a new <see cref="SharedMemoryListener"/> is created.
    /// </summary>
    [UsedImplicitly(ImplicitUseTargetFlags.Members)]
    public interface IListenerContext
    {
        ///<summary>
        /// The maximum number of pending connection allowed on the listener.
        ///</summary>
        /// <value>
        ///     The maximum nuber of pending connections allowed on a newly 
        ///     created listener. This number must be at least 1. The
        ///     default value is 32.
        /// </value>
        /// <exception cref="ArgumentOutOfRangeException">
        ///     The value being set was less than 1 or more than 4094.
        /// </exception>
        int MaxPendingConnections { get; set; }
    }
}